//package com.example.springaop.aop;
//
//
//import com.aliyun.dingtalkim_1_0.*;
//import com.aliyun.dingtalkim_1_0.models.*;
//import com.aliyun.tea.*;
//import com.aliyun.teaopenapi.*;
//import com.aliyun.teaopenapi.models.*;
//import com.aliyun.teautil.*;
//import com.aliyun.teautil.models.*;
///**
// * @author: 任福祥
// * * @create: 2024-02-29 18:13
// */
//public class Sample {
//
//    /**
//     * 使用 Token 初始化账号Client
//     * @return Client
//     * @throws Exception
//     */
//    public static com.aliyun.dingtalkim_1_0.Client createClient() throws Exception {
//        Config config = new Config();
//        config.protocol = "https";
//        config.regionId = "central";
//        return new com.aliyun.dingtalkim_1_0.Client(config);
//    }
//
//    public static void main(String[] args_) throws Exception {
//        java.util.List<String> args = java.util.Arrays.asList(args_);
//        com.aliyun.dingtalkim_1_0.Client client = Sample.createClient();
//        SendRobotInteractiveCardHeaders sendRobotInteractiveCardHeaders = new SendRobotInteractiveCardHeaders();
//        sendRobotInteractiveCardHeaders.xAcsDingtalkAccessToken = "<your access token>";
//        SendRobotInteractiveCardRequest.SendRobotInteractiveCardRequestSendOptions sendOptions = new SendRobotInteractiveCardRequest.SendRobotInteractiveCardRequestSendOptions()
//                .setAtUserListJson("[{\"nickName\":\"张三\",\"userId\":\"userId0001\"},{\"nickName\":\"李四\",\"unionId\":\"unionId001\"}]")
//                .setAtAll(false)
//                .setReceiverListJson("[{\"userId\":\"userId0001\"},{\"unionId\":\"unionId001\"}]")
//                .setCardPropertyJson("{}");
//        SendRobotInteractiveCardRequest sendRobotInteractiveCardRequest = new SendRobotInteractiveCardRequest()
//                .setCardTemplateId("xxxxxxxx")
//                .setOpenConversationId("cidXXXX")
//                .setSingleChatReceiver("以userId为例：{\"userId\":\"userId0001\"}；以unionId为例{\"unionId\":\"unionId001\"}")
//                .setCardBizId("cardXXXX01")
//                .setRobotCode("xxxxxx")
//                .setCallbackUrl("https://***")
//                .setCardData("{   \"config\": {     \"autoLayout\": true,     \"enableForward\": true   },   \"header\": {     \"title\": {       \"type\": \"text\",       \"text\": \"钉钉卡片\"     },     \"logo\": \"@lALPDfJ6V_FPDmvNAfTNAfQ\"   },   \"contents\": [     {       \"type\": \"text\",       \"text\": \"钉钉正在为各行各业提供专业解决方案，沉淀钉钉1900万企业组织核心业务场景，提供专属钉钉、教育、医疗、新零售等多行业多维度的解决方案。\",       \"id\": \"text_1658220665485\" } ]}")
//                .setUserIdPrivateDataMap("{\"userId0001\":{\"xxxx\":\"xxxx\"}}")
//                .setUnionIdPrivateDataMap("{\"unionId0001\":{\"xxxx\":\"xxxx\"}}")
//                .setSendOptions(sendOptions)
//                .setPullStrategy(false);
//        try {
//            client.sendRobotInteractiveCardWithOptions(sendRobotInteractiveCardRequest, sendRobotInteractiveCardHeaders, new RuntimeOptions());
//        } catch (TeaException err) {
//            if (!com.aliyun.teautil.Common.empty(err.code) && !com.aliyun.teautil.Common.empty(err.message)) {
//                // err 中含有 code 和 message 属性，可帮助开发定位问题
//            }
//
//        } catch (Exception _err) {
//            TeaException err = new TeaException(_err.getMessage(), _err);
//            if (!com.aliyun.teautil.Common.empty(err.code) && !com.aliyun.teautil.Common.empty(err.message)) {
//                // err 中含有 code 和 message 属性，可帮助开发定位问题
//            }
//
//        }
//    }
//}